<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="App/Admin/View/Public//js/html5.js"></script>
<script type="text/javascript" src="App/Admin/View/Public//js/respond.min.js"></script>
<script type="text/javascript" src="App/Admin/View/Public//js/PIE_IE678.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="App/Admin/View/Public//css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="App/Admin/View/Public//css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="App/Admin/View/Public//font/font-awesome.min.css"/>
<!--[if IE 7]>
<link href="App/Admin/View/Public//font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->

<title>店铺展示</title>
</head>
<style>
.current{padding: 4px 11px;background:#FFC904 ;color: #fff; border: 1px solid #e5e5e5; font-size: 15px }
.num{ background: ; color: #009f8f;padding: 4px 11px;border: 1px solid #e5e5e5; font-size: 15px   }
.prev{border: 1px solid #e5e5e5; background: ;  color: #009f8f; font-size: 15px;padding: 4px 11px;}
.next{ border: 1px solid #e5e5e5; background: ; color: #009f8f; font-size: 15px;padding: 4px 11px; }

.ddd{border: 1px solid #e5e5e5; color:#009f8f;padding: 4px 11px;font-size: 15px}


</style>
<body>
<nav class="Hui-breadcrumb"><i class="icon-home"></i> 首页 <span class="c-gray en">&gt;</span> 管理 <span class="c-gray en">&gt;</span> 列表 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>


   <div class="panel panel-primary radius">
  
   &nbsp;&nbsp;  

  
  </div>
<div class="pd-20">

 <form action="<?php echo U('Dingdan/del');?>" method="POST" >
   <div class="panel panel-primary radius">
    &nbsp;&nbsp;   <span class="l"> <a href="#" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a></span>
	 &nbsp;&nbsp;    <!-- <a href="<?php echo U('Admin/User/addUser');?>"  class="btn btn-primary radius"><i class="icon-plus"></i>  添加资讯信息</a> -->

  </div>
	<div class="panel-body">
  <table  class="table table-border table-bordered  radius table-striped table-hover"  width="100%" height="20px">
    <thead>
    
      <tr class="text-c">
           <th width="31" align="center"><input type="checkbox" name="" value=""></th>  
        <th width="30" align="center">ID</th>
      <!--   <th width="150" align="center">展示分类</th> -->
        <th width="80" align="center">订单编号</th>
        <th  width="80" align="center">收货地址</th>
        <th width="80" align="center">下单日期</th>
<!--           <th width="80" align="center">设计师</th> -->
        <th width="80" align="center">交易状态</th>
    
<!--        <th width="80" align="center">所在城市</th> -->
      <th width="80" align="center">操作</th>
        <th width="87" align="center">详情信息</th>
      </tr>
    </thead>
    <tbody>
	 <?php if(is_array($dingdan)): $key = 0; $__LIST__ = $dingdan;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($key % 2 );++$key;?><tr class="text-c">
          <td align="center"><input type="checkbox" value="<?php echo ($vo["id"]); ?>" id="id" name="id[]"></td>
        <td align="center"><?php echo (I('get.p'))?((I('get.p')-1)*20+$key):($key);?></td>
      <!--   <td align="center"><?php echo ($vo["cat_id"]); ?></td> -->
        <td align="center"><?php echo ($vo["code"]); ?></td>
         <td align="center" style="text-align: center;"><?php echo ($vo["address"]); ?></td>
   <td align="center">  <?php echo (date("Y.m.d H:i",$vo["time"])); ?></td>
 <!--   <td align="center"><?php if($vo["shejishi"] != admin): echo ($vo["shejishi"]); else: ?>后台admin<?php endif; ?></td> -->
     <td align="center"> <?php if($vo["htid"] == 0): ?>已下单<?php endif; if($vo["htid"] == 2): ?>已拒接<?php endif; if($vo["htid"] == 1): ?>已接单<?php endif; if($vo["htid"] == 3): ?>已分配<?php endif; if($vo["htid"] == 4): ?>设计师已接单<?php endif; if($vo["htid"] == 5): ?>已联系<?php endif; if($vo["htid"] == 6): ?>已签订合同<?php endif; if($vo["htid"] == 7): ?>待设计<?php endif; if($vo["htid"] == 8): ?>设计已上传<?php endif; if($vo["htid"] == 9): ?>设计已确认<?php endif; if($vo["htid"] == 10): ?>建造中<?php endif; if($vo["htid"] == 11): ?>建造完成<?php endif; if($vo["htid"] == 12): ?>已拒接订单<?php endif; if($vo["htid"] == 13): ?>待装配<?php endif; if($vo["htid"] == 14): ?>装配中<?php endif; if($vo["htid"] == 15): ?>已取消<?php endif; if($vo["htid"] == 16): ?>已完成<?php endif; if($vo["htid"] == 17): ?>已评价<?php endif; if($vo["htid"] == 55): ?>选择正确状态<?php endif; ?></td>
         
<!--      <td align="center"><?php echo ($vo['dingdan']['chengshi']); ?></td> -->
     <td align="center">   
                    <?php if($vo["htid"] == 0 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style="margin-right: 10%;"><a style="text-decoration: underline;" href="javascript:;" onClick="jd(this,<?php echo ($vo["id"]); ?>)">接单</a></span>
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="bj(this,<?php echo ($vo["id"]); ?>)" >拒绝接单</a></span>
                    </div><?php endif; ?>

                     <?php if($vo["htid"] == 1 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                     <?php if($vo["shejishi"] != admin): ?><span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="fp(this,<?php echo ($vo["id"]); ?>)" >分配设计师</a></span><?php else: ?>  <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="fp1(this,<?php echo ($vo["id"]); ?>)" >分配设计师</a></span><?php endif; ?></td>
                     
                    </div><?php endif; ?>

                       <?php if($vo["htid"] == 4 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                    <!--     <span style="margin-right: 10%;"><a style="text-decoration: underline;" href="javascript:;" onClick="jd(this,<?php echo ($vo["id"]); ?>)">详情</a></span> -->
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="lx(this,<?php echo ($vo["id"]); ?>)" >联系</a></span>
                    </div><?php endif; ?>
                              <?php if($vo["htid"] == 5 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                    <!--     <span style="margin-right: 10%;"><a style="text-decoration: underline;" href="javascript:;" onClick="jd(this,<?php echo ($vo["id"]); ?>)">详情</a></span> -->
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="qd(this,<?php echo ($vo["id"]); ?>)" >签订合同</a></span>
                    </div><?php endif; ?>
                                  <?php if($vo["htid"] == 6 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                    <!--     <span style="margin-right: 10%;"><a style="text-decoration: underline;" href="javascript:;" onClick="jd(this,<?php echo ($vo["id"]); ?>)">详情</a></span> -->
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xq(this,<?php echo ($vo["id"]); ?>)" >详情</a></span>
                    </div><?php endif; ?>
                    <?php if($vo["htid"] == 9 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xqa(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                      <?php if($vo["htid"] == 10 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xqb(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                      <?php if($vo["htid"] == 11 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xqc(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                          <?php if($vo["htid"] == 13 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xqd(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                     <?php if($vo["htid"] == 14 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xqe(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                       <?php if($vo["htid"] == 15 ): ?><!--    <div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style="margin-right: 10%;"><a style="text-decoration: underline;" href="javascript:;" onClick="jd(this,<?php echo ($vo["id"]); ?>)">确认</a></span>
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="bj(this,<?php echo ($vo["id"]); ?>)" >拒绝</a></span>
                    </div> --><?php endif; ?>
    <?php if($vo["htid"] == 55 ): ?><div class="table" style="font-size: 11px;color: #7bc2f1;" >
                        <span style=""><a style="text-decoration: underline;" href="javascript:;" onClick="xq(this,<?php echo ($vo["id"]); ?>)">详情</a></span>
                        
                    </div><?php endif; ?>
                    </td>
        <td align="center" class="f-14 admin-manage"><a title="详细" href="<?php echo U('Admin/Dingdan/update',array('id'=>$vo['id']));?>"  class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> </td>
      </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>
  </table>
 <div id="pageNav" class="pageNav"> <?php echo ($page); ?></div>
</div>

</form>
<script type="text/javascript" src="App/Admin/View/Public//js/jquery.min.js"></script>
<!-- <script type="text/javascript" src="App/Admin/View/Public//layer/layer.min.js"></script> -->
<script type="text/javascript" src="App/Admin/View/Public//js/jquery.form.js"></script>
<script type="text/javascript" src="App/Admin/View/Public//js/H-ui.admin.js"></script>  
    <script type="text/javascript" src="App/Home/View/Public/script/jquery.js"></script>
<script type="text/javascript" src="App/Home/View/Public/layer/layer.js"></script>

<script type="text/javascript">


$(function(){

  $(".l").click(function(){
     layer.confirm('确认要删除吗？',function(index){
     $("form").submit();
    
    });

  });
});

</script>
<script>
function jd(obj,id){

 $.ajax({
        url:'<?php echo U("Dingdan/daijiedan");?>',
        type:'post',
        data:{
         id:id
        },
        success:function(data){
          if (data==1) {
            layer.msg('接单成功',{time:1000},function(){

     location.reload();
})
          }


        }

 })

}


function bj(obj,id){

 $.ajax({
        url:'<?php echo U("Dingdan/daijiedan1");?>',
        type:'post',
        data:{
         id:id
        },
        success:function(data){
layer.msg('拒绝接单',{time:1000},function(){

     location.reload();
})

        }

 })

}
function fp(obj,id){
  $.ajax({
        url:'<?php echo U("Dingdan/fpshejishi");?>',
        type:'post',
        data:{
          'id':id
        },
        success:function(data){
          layer.msg('分配成功',{time:1000},function(){

     location.reload();
})

        }

  })



}
function fp1(obj,id){
  $.ajax({
        url:'<?php echo U("Dingdan/fpshejishi1");?>',
        type:'post',
        data:{
          'id':id
        },
        success:function(data){
          layer.msg('分配成功',{time:1000},function(){

     location.reload();
})

        }

  })



}
function lx(obj,id){

$.ajax({
url:'<?php echo U("Dingdan/lx");?>',
type:'post',
data:{
  'id':id
},
    success:function(data){
          layer.msg('已联系',{time:1000},function(){

     location.reload();
})

        }
})

}
function qd(obj,id){
  $.ajax({
    url:'<?php echo U("Dingdan/qd");?>',
    type:'post',
    data:{
      'id':id,
    },
    success:function(data){
          layer.msg('已签订合同',{time:1000},function(){

     location.reload();
})

    }


  })



}
function xq(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xq");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
function xqa(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xqa");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
function xqb(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xqb");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
function xqc(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xqc");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
function xqd(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xqd");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
function xqe(obj,id){

layer.open({
          type: 2,
          // skin: 'layui-layer-rim', //加上边框
          area: ['400px', '300px'], //宽高
          title:'',
          content: ['<?php echo U("Dingdan/xqe");?>'+'&id='+id],
          end: function(){
                location.reload();
            }
        
        });

  

}
</script>
</body>
</html>